import type { UserInfo } from '@vben/types';

import { requestClient } from '#/api/request';

/**
 * 获取用户信息
 */
export async function getUserInfoApi() {
  return requestClient.get<UserInfo>('/auth/me');
}

/**
 * 修改密码
 * @param params 密码参数
 */
export async function changePasswordApi(params: {
  oldPassword: string;
  newPassword: string;
}) {
  return requestClient.post('/api/admin/User/change-password', params);
}
